package com.bocai.yuweiwangluo.activity;


import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bocai.yuweiwangluo.R;
import com.bocai.yuweiwangluo.base.BaseActivity;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 关于我们界面
 */
public class AboutUsActivity extends BaseActivity implements View.OnClickListener
{

    @ViewInject(R.id.ll_aboutus_check_newversion)
    LinearLayout llCheckNewVersion;
    @ViewInject(R.id.ll_aboutus_welcome)
    LinearLayout llWelcome;
    @ViewInject(R.id.tv_about_company_english)
    TextView tvCompanyEnglish;
    @Override
    protected int contentView()
    {
        return R.layout.activity_aboutus;
    }

    @Override
    protected void setData()
    {
        ViewUtils.inject(this);
        initToolbar("关于我们");
        SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy");
        Date data=new Date(System.currentTimeMillis());
        String year=dateFormat.format(data);
        tvCompanyEnglish.setText("@"+year+"Fishtail Hangzhou Network Technology Co.,Ltd");
        initEvent();
    }

    @Override
    protected void initEvent()
    {
        super.initEvent();
        llCheckNewVersion.setOnClickListener(this);
        llWelcome.setOnClickListener(this);
    }

    @Override
    public void onClick(View v)
    {
        switch (v.getId())
        {
            case R.id.ll_aboutus_check_newversion:
                //检查更新版本
                break;
            case R.id.ll_aboutus_welcome:
                //跳转到引导页
                Intent intent=new Intent(this,GuideActivity.class);
                intent.putExtra("what",100);
                startActivity(intent);
                break;
        }
    }
}
